clc; clear; close all;

%late 2 2, ft rate 46.2%
run1ar=[5.0000         0         0
    6.0000         0         0
    7.0000    0.0871    0.1917
    8.0000    0.0461    0.0084
    9.0000    0.1896    0.0580
   10.0000    0.0379    0.4801
   11.0000    0.0027    0.6394
   12.0000    0.1056    0.1886
   13.0000    0.0574    1.5375
   14.0000    0.1090   14.5924
   15.0000    0.0120    0.2409
   16.0000    0.0613    0.0680
   17.0000    0.0520    0.6434
   18.0000    0.0523    3.0525
   19.0000    0.0328    0.8486
   20.0000    0.0428    1.2275
   21.0000    0.1537    2.6498
   22.0000    0.0664    0.8027
   23.0000    0.0507    0.6418
   24.0000    0.1167    0.4849
   25.0000    0.2156    0.3612
   26.0000    0.0426    0.8753
   27.0000    0.1016    0.4729
   28.0000    0.0476    0.6975
   29.0000    0.0441    0.2371];
run1ar(run1ar==0)=NaN;
figure(1)
subplot(2,1,1)
plot(run1ar(:,1),run1ar(:,2)),grid;
ylabel('\theta')
title('RMSE \theta R 1 Runs')
subplot(2,1,2)
plot(run1ar(:,1),run1ar(:,3)),grid;
ylabel('R')
xlabel('Time (k)')

run1xy=[ 5.0000         0         0
    6.0000         0         0
    7.0000   12.1278   32.2457
    8.0000    6.5270   16.5735
    9.0000   21.0595   69.2632
   10.0000    5.8562   13.0671
   11.0000    1.0243    0.5765
   12.0000   21.1277   32.2406
   13.0000    9.3477   18.5940
   14.0000    8.2491   40.0924
   15.0000    2.7787    3.2681
   16.0000   14.5665   16.1746
   17.0000   13.3821   12.6552
   18.0000   11.7833   14.6642
   19.0000    8.3486    8.1017
   20.0000   12.8763    8.1704
   21.0000   40.1723   37.3410
   22.0000   19.2616   14.3794
   23.0000   15.9998    9.1826
   24.0000   39.3248   18.2935
   25.0000   69.0286   41.8924
   26.0000   14.8392    6.6307
   27.0000   37.4966   11.3421
   28.0000   18.0161    5.5979
   29.0000   17.0856    5.1342];
run1xy(run1xy==0)=NaN;
figure(2)
subplot(2,1,1)
plot(run1xy(:,1),run1xy(:,2)),grid;
ylabel('x')
title('RMSE x y 1 Runs')
subplot(2,1,2)
plot(run1xy(:,1),run1xy(:,3)),grid;
ylabel('y')
xlabel('Time (k)')

run1xyv=[ 6.0000e+00            0            0
   7.0000e+00   4.7167e+01   1.3404e+02
   8.0000e+00   1.7874e+00   6.8200e+00
   9.0000e+00   1.0182e+01   2.8755e+01
   1.0000e+01   8.5000e+00   2.6706e+01
   1.1000e+01   1.1368e+00   3.5755e+00
   1.2000e+01   5.8331e+00   8.7027e+00
   1.3000e+01   8.6602e+00   1.3889e+01
   1.4000e+01   7.8975e-01   5.2946e+00
   1.5000e+01   3.9803e-01   8.6612e+00
   1.6000e+01   4.5764e+00   5.1025e+00
   1.7000e+01   2.9854e-01   9.6265e-01
   1.8000e+01   4.3322e-01   1.1953e+00
   1.9000e+01   8.3741e-01   1.9637e+00
   2.0000e+01   8.3600e-01   7.1458e-02
   2.1000e+01   1.1794e+01   1.0064e+01
   2.2000e+01   4.5206e+00   5.1520e+00
   2.3000e+01   9.1357e-01   5.1632e-01
   2.4000e+01   1.1135e+01   6.4210e+00
   2.5000e+01   2.1674e+01   1.2458e+01
   2.6000e+01   1.7221e+01   9.6813e+00
   2.7000e+01   3.9405e+00   4.6618e-01
   2.8000e+01   1.0440e+01   2.6614e+00
   2.9000e+01   3.1369e-01   9.8100e-02];
run1xyv(run1xyv==0)=NaN;
figure(3)
subplot(2,1,1)
plot(run1xyv(:,1), run1xyv(:,2)),grid;
ylabel('v_x')
title('RMSE v_x v_y 1 Runs')
subplot(2,1,2)
plot(run1xyv(:,1), run1xyv(:,3)),grid;
ylabel('v_y')
xlabel('Time (k)')

%late 0.2 1.8
%ft rate 74.5%
run5ar=[5.0000    0.7091    8.7807
    6.0000    0.0713   30.3893
    7.0000    0.0203   24.7764
    8.0000    0.1833    0.4387
    9.0000    0.1360    0.6691
   10.0000    0.1413    0.6780
   11.0000    0.1034    0.5678
   12.0000    0.0868    0.8820
   13.0000    0.0929    0.7539
   14.0000    0.1593   13.9094
   15.0000    0.1342    2.4011
   16.0000    0.0761    6.6931
   17.0000    1.2355   17.6538
   18.0000    0.2197   17.8698
   19.0000    0.2212   18.2453
   20.0000    0.1195    2.8022
   21.0000    0.0629   15.6709
   22.0000    0.1059   12.7841
   23.0000    0.1387   14.8408
   24.0000    0.1101    2.8802
   25.0000    0.0787    4.2017
   26.0000    0.2057   10.1836
   27.0000    0.1013   15.8856
   28.0000    0.0891    6.8153
   29.0000    0.0674    2.1318];
run5ar(run5ar==0)=NaN;
figure(4)
subplot(2,1,1)
plot(run5ar(:,1),run5ar(:,2)),grid;
ylabel('\theta')
title('RMSE \theta R 5 Runs')
subplot(2,1,2)
plot(run5ar(:,1),run5ar(:,3)),grid;
ylabel('R')
xlabel('Time (k)')

run5xy=[5.0000e+00   2.1151e+02   1.6928e+02
   6.0000e+00   3.1853e+01   2.6788e+01
   7.0000e+00   2.1781e+01   1.4155e+01
   8.0000e+00   1.8649e+01   6.8676e+01
   9.0000e+00   2.1126e+01   4.7289e+01
   1.0000e+01   2.0032e+01   4.9313e+01
   1.1000e+01   1.4660e+01   3.5199e+01
   1.2000e+01   1.7026e+01   2.6738e+01
   1.3000e+01   1.8870e+01   2.7832e+01
   1.4000e+01   2.7009e+01   5.3650e+01
   1.5000e+01   3.2466e+01   3.4522e+01
   1.6000e+01   1.4991e+01   2.3246e+01
   1.7000e+01   4.3491e+01   5.8217e+01
   1.8000e+01   4.9487e+01   6.7049e+01
   1.9000e+01   5.3317e+01   6.4946e+01
   2.0000e+01   3.5854e+01   2.3008e+01
   2.1000e+01   1.4184e+01   2.3151e+01
   2.2000e+01   2.7045e+01   2.9020e+01
   2.3000e+01   3.7660e+01   3.5962e+01
   2.4000e+01   3.4510e+01   2.1628e+01
   2.5000e+01   2.7658e+01   1.1174e+01
   2.6000e+01   6.1575e+01   4.7528e+01
   2.7000e+01   3.5912e+01   2.2302e+01
   2.8000e+01   3.4490e+01   8.0204e+00
   2.9000e+01   2.6311e+01   7.3103e+00];
run5xy(run5xy==0)=NaN;
figure(5)
subplot(2,1,1)
plot(run5xy(:,1),run5xy(:,2)),grid;
ylabel('x')
title('RMSE x y 5 Runs')
subplot(2,1,2)
plot(run5xy(:,1),run5xy(:,3)),grid;
ylabel('y')
xlabel('Time (k)')

run5xyv=[6.0000e+00   2.2436e+02   1.8447e+02
   7.0000e+00   1.4637e+01   1.9261e+01
   8.0000e+00   1.8520e+01   5.0007e+01
   9.0000e+00   1.2791e+01   4.7632e+01
   1.0000e+01   2.0627e+01   4.2193e+01
   1.1000e+01   1.2358e+01   3.0402e+01
   1.2000e+01   1.6788e+01   3.3117e+01
   1.3000e+01   1.2961e+01   1.9250e+01
   1.4000e+01   6.4358e+01   6.1929e+01
   1.5000e+01   7.2717e+01   6.1208e+01
   1.6000e+01   2.1279e+01   2.3110e+01
   1.7000e+01   5.8794e+01   6.9589e+01
   1.8000e+01   1.2057e+01   1.3419e+01
   1.9000e+01   2.5508e+01   2.2664e+01
   2.0000e+01   3.0823e+01   3.7181e+01
   2.1000e+01   2.2017e+01   2.2584e+01
   2.2000e+01   1.4895e+01   9.3776e+00
   2.3000e+01   2.3479e+01   2.2764e+01
   2.4000e+01   1.3658e+01   1.3617e+01
   2.5000e+01   2.0321e+01   1.1232e+01
   2.6000e+01   2.9962e+01   2.1115e+01
   2.7000e+01   1.5436e+01   1.4091e+01
   2.8000e+01   1.4301e+01   8.7952e+00
   2.9000e+01   1.1163e+01   4.8349e+00];
run5xyv(run5xyv==0)=NaN;
figure(6)
subplot(2,1,1)
plot(run5xyv(:,1), run5xyv(:,2)),grid;
ylabel('v_x')
title('RMSE v_x v_y 5 Runs')
subplot(2,1,2)
plot(run5xyv(:,1), run5xyv(:,3)),grid;
ylabel('v_y')
xlabel('Time (k)')
%late 2.9 1.5
%ft rate 73.4%
run10ar=[ 5.0000    0.7090    9.9929
    6.0000    0.3980   20.1750
    7.0000    0.2290   36.7897
    8.0000    0.1431   15.1101
    9.0000    0.0692    9.7006
   10.0000    0.1229    5.1560
   11.0000    0.0650   23.4295
   12.0000    0.0917    2.7607
   13.0000    0.0840   13.4081
   14.0000    0.1648   13.1785
   15.0000    0.1309    3.6095
   16.0000    0.1006    1.5963
   17.0000    0.1300    1.0442
   18.0000    0.1422    4.4378
   19.0000    0.0986    1.4574
   20.0000    0.1158    1.2452
   21.0000    0.0973    2.2593
   22.0000    0.1010    2.7376
   23.0000    0.1041    2.0252
   24.0000    0.1035    6.9122
   25.0000    0.1108    8.5800
   26.0000    0.0842    8.9320
   27.0000    0.0997    7.5217
   28.0000    0.0538    2.9462
   29.0000    0.1320    4.6177];
run10ar(run10ar==0)=NaN;
figure(7)
subplot(2,1,1)
plot(run10ar(:,1),run10ar(:,2)),grid;
ylabel('\theta')
title('RMSE \theta R 10 Runs')
subplot(2,1,2)
plot(run10ar(:,1),run10ar(:,3)),grid;
ylabel('R')
xlabel('Time (k)')

run10xy=[ 5.0000e+00   2.0598e+02   1.8384e+02
   6.0000e+00   1.0770e+02   1.0194e+02
   7.0000e+00   6.8635e+01   5.5354e+01
   8.0000e+00   3.2907e+01   4.5869e+01
   9.0000e+00   1.0747e+01   2.6015e+01
   1.0000e+01   2.3963e+01   3.9103e+01
   1.1000e+01   1.7208e+01   2.9413e+01
   1.2000e+01   1.6762e+01   2.9387e+01
   1.3000e+01   2.3099e+01   2.4915e+01
   1.4000e+01   4.4359e+01   4.2552e+01
   1.5000e+01   2.8380e+01   3.6919e+01
   1.6000e+01   2.4960e+01   2.5740e+01
   1.7000e+01   2.8178e+01   3.6261e+01
   1.8000e+01   3.4989e+01   3.6145e+01
   1.9000e+01   2.6234e+01   2.3069e+01
   2.0000e+01   3.0859e+01   2.7071e+01
   2.1000e+01   2.9032e+01   1.9403e+01
   2.2000e+01   3.1263e+01   1.9074e+01
   2.3000e+01   3.0506e+01   2.2735e+01
   2.4000e+01   3.6135e+01   1.4466e+01
   2.5000e+01   3.6193e+01   2.2251e+01
   2.6000e+01   2.8363e+01   1.7202e+01
   2.7000e+01   3.8747e+01   6.6813e+00
   2.8000e+01   1.9634e+01   8.9399e+00
   2.9000e+01   5.0356e+01   1.6249e+01];
run10xy(run10xy==0)=NaN;
figure(8)
subplot(2,1,1)
plot(run10xy(:,1),run10xy(:,2)),grid;
ylabel('x')
title('RMSE x y 10 Runs')
subplot(2,1,2)
plot(run10xy(:,1),run10xy(:,3)),grid;
ylabel('y')
xlabel('Time (k)')

run10xyv=[ 6.0000e+00   1.0449e+02   1.8446e+02
   7.0000e+00   6.1415e+01   1.9377e+02
   8.0000e+00   5.3078e+01   5.7045e+01
   9.0000e+00   3.1227e+01   4.9834e+01
   1.0000e+01   2.4749e+01   4.0692e+01
   1.1000e+01   4.2484e+01   8.7161e+01
   1.2000e+01   4.6494e+01   7.5439e+01
   1.3000e+01   2.2027e+01   3.4087e+01
   1.4000e+01   3.8620e+01   3.3192e+01
   1.5000e+01   3.8947e+01   4.3826e+01
   1.6000e+01   6.7194e+01   7.2415e+01
   1.7000e+01   3.5599e+01   4.2937e+01
   1.8000e+01   3.4211e+01   3.6680e+01
   1.9000e+01   2.0491e+01   1.8489e+01
   2.0000e+01   2.5723e+01   2.3621e+01
   2.1000e+01   2.4624e+01   2.0339e+01
   2.2000e+01   2.9842e+01   1.9723e+01
   2.3000e+01   2.7646e+01   1.8712e+01
   2.4000e+01   2.8919e+01   1.6150e+01
   2.5000e+01   3.4764e+01   1.9272e+01
   2.6000e+01   2.9983e+01   1.5387e+01
   2.7000e+01   2.5079e+01   1.0823e+01
   2.8000e+01   2.7439e+01   6.3721e+00
   2.9000e+01   3.0876e+01   8.4616e+00];

figure(9)
run10xyv(run10xyv==0)=NaN;
subplot(2,1,1)
plot(run10xyv(:,1), run10xyv(:,2)),grid;
ylabel('v_x')
title('RMSE v_x v_y 10 Runs')
subplot(2,1,2)
plot(run10xyv(:,1), run10xyv(:,3)),grid;
ylabel('v_y')
xlabel('Time (k)')

%late 5.5 0.65
%ft rate78.3%
run20ar=[ 5.0000    0.6627   21.3510
    6.0000    0.2480   32.0040
    7.0000    0.1176   21.1109
    8.0000    0.1835   13.3119
    9.0000    0.1634   12.0955
   10.0000    0.1832   12.9889
   11.0000    0.1187    8.6893
   12.0000    0.1114    5.1926
   13.0000    0.0865    2.2428
   14.0000    0.1747   13.8084
   15.0000    0.1511   10.3742
   16.0000    0.1681   10.3880
   17.0000    0.4861    9.6693
   18.0000    0.1336   10.4574
   19.0000    0.1583    8.8543
   20.0000    0.1066    2.3662
   21.0000    0.0806    9.4798
   22.0000    0.0820    9.5534
   23.0000    0.1196    5.1518
   24.0000    0.1252   12.5032
   25.0000    0.0939   10.1807
   26.0000    0.1065    9.3860
   27.0000    0.0798   12.6493
   28.0000    0.1323   13.7012
   29.0000    0.0657   16.6455];
run20ar(run20ar==0)=NaN;
figure(10)
subplot(2,1,1)
plot(run20ar(:,1),run20ar(:,2)),grid;
ylabel('\theta')
title('RMSE \theta R 20 Runs')
subplot(2,1,2)
plot(run20ar(:,1),run20ar(:,3)),grid;
ylabel('R')
xlabel('Time (k)')
run20xy=[5.0000e+00   1.8428e+02   1.7856e+02
   6.0000e+00   6.8534e+01   7.6450e+01
   7.0000e+00   3.4145e+01   3.4855e+01
   8.0000e+00   4.7316e+01   4.3567e+01
   9.0000e+00   4.2220e+01   3.9431e+01
   1.0000e+01   4.9951e+01   4.1536e+01
   1.1000e+01   3.0297e+01   2.8481e+01
   1.2000e+01   1.9040e+01   3.6066e+01
   1.3000e+01   1.6870e+01   2.6539e+01
   1.4000e+01   4.1070e+01   5.0119e+01
   1.5000e+01   3.9805e+01   3.9399e+01
   1.6000e+01   4.7434e+01   3.7996e+01
   1.7000e+01   2.0189e+01   2.5636e+01
   1.8000e+01   3.1669e+01   3.8081e+01
   1.9000e+01   4.2894e+01   3.9524e+01
   2.0000e+01   2.8555e+01   2.5173e+01
   2.1000e+01   2.3885e+01   2.0105e+01
   2.2000e+01   2.6714e+01   1.5817e+01
   2.3000e+01   3.8046e+01   2.1699e+01
   2.4000e+01   4.3354e+01   2.1264e+01
   2.5000e+01   2.9428e+01   2.2147e+01
   2.6000e+01   3.5535e+01   2.1391e+01
   2.7000e+01   2.8807e+01   1.7006e+01
   2.8000e+01   4.7181e+01   2.4683e+01
   2.9000e+01   2.4453e+01   1.9269e+01];
run20xy(run20xy==0)=NaN;
figure(11)
subplot(2,1,1)
plot(run20xy(:,1),run20xy(:,2)),grid;
ylabel('x')
title('RMSE x y 20 Runs')
subplot(2,1,2)
plot(run20xy(:,1),run20xy(:,3)),grid;
ylabel('y')
xlabel('Time (k)')

run20xyv=[6.0000e+00   3.0653e+02   2.3239e+02
   7.0000e+00   1.3031e+02   3.7277e+02
   8.0000e+00   9.9617e+01   1.4512e+02
   9.0000e+00   6.1249e+01   1.9716e+02
   1.0000e+01   4.1386e+01   5.0102e+01
   1.1000e+01   3.7456e+01   4.5706e+01
   1.2000e+01   3.9200e+01   4.9543e+01
   1.3000e+01   2.4624e+01   5.0460e+01
   1.4000e+01   4.7196e+01   6.2960e+01
   1.5000e+01   3.6133e+01   5.2781e+01
   1.6000e+01   3.6478e+01   3.4467e+01
   1.7000e+01   4.7430e+01   4.0536e+01
   1.8000e+01   2.2358e+01   2.6799e+01
   1.9000e+01   3.5115e+01   3.6574e+01
   2.0000e+01   3.8854e+01   3.3230e+01
   2.1000e+01   3.7420e+01   2.8845e+01
   2.2000e+01   3.1355e+01   2.1858e+01
   2.3000e+01   3.5168e+01   1.9391e+01
   2.4000e+01   3.4157e+01   1.8924e+01
   2.5000e+01   4.0713e+01   2.3860e+01
   2.6000e+01   3.8596e+01   2.5568e+01
   2.7000e+01   3.8733e+01   1.9485e+01
   2.8000e+01   3.6265e+01   1.7806e+01
   2.9000e+01   3.7691e+01   1.2775e+01];

figure(12)
run20xyv(run20xyv==0)=NaN;
subplot(2,1,1)
plot(run20xyv(:,1), run20xyv(:,2)),grid;
ylabel('v_x')
title('RMSE v_x v_y 20 Runs')
subplot(2,1,2)
plot(run20xyv(:,1), run20xyv(:,3)),grid;
ylabel('v_y')
xlabel('Time (k)')

